<script>
    alert("<?=$msg;?>");
    window.location.href="<?=$url;?>";
</script>